#!/usr/bin/python
#encoding=utf-8

'''
Created on Apr 3, 2014

@author: root
'''
        
def tsplit(string, delimiters):
    '''Behaves str.split but supports multiple delimiters.'''

    delimiters = tuple(delimiters)
    stack = [string,]

    for delimiter in delimiters:
        for i, substring in enumerate(stack):
            substack = substring.split(delimiter)
            stack.pop(i)
            for j, _substring in enumerate(substack):
                stack.insert(i+j, _substring)

    return stack


if __name__ == "__main__": 
    pass
